
package com.insigma.business.qrcode.soldier.dao;


import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.dto.SoldierApplyInfoBSearcher;
import com.insigma.business.qrcode.soldier.entity.SoldierApplyInfoDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Set;


public interface SoldierApplyInfoDao {

    
    List<SoldierApplyInfoDO> search(final SoldierApplyInfoBSearcher innerSearcher);

    SoldierApplyInfoDO get(final String id);

    
    Integer insert(final SoldierApplyInfoDO soldierApplyInfoDO);

    
    Integer update(final SoldierApplyInfoDO soldierApplyInfoDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    List<SoldierApplyInfoDO> listByProcInstIds(@Param("procInstIds") Set<String> procInstIds);

    
    @Crypt(encryptParamIndex = {0})
    SoldierApplyInfoDO getByIdCardNo(@Param("idCardNo") String idCardNo, @Param("applyType") String applyType);

    @Crypt(encryptParamIndex = {0})
    SoldierApplyInfoDO getByIdCardInfo(@Param("idCardNo") String idCardNo);

    @Crypt(encryptParamIndex = {0})
    List<SoldierApplyInfoDO> getByIdCardAndAreaCode(@Param("idCardNo") String idCardNo, @Param("areaCode") String areaCode);

    SoldierApplyInfoDO getBySoldierId(@Param("soldierId")String soldierId , @Param("applyType") String applyType);

    
    List<SoldierApplyInfoDO> searchByProcInstIds(SoldierApplyInfoBSearcher searcher);

    
    List<SoldierApplyInfoDO> searchByAreaLikeStatusManual(SoldierApplyInfoBSearcher soldierApplyInfoBSearcher);

    
    List<SoldierApplyInfoDO> searchByAreaLikeAndStatusList(SoldierApplyInfoBSearcher soldierApplyInfoBSearcher);

    Integer realDelete(String id);

    List<SoldierApplyInfoDO> listBySoldierId(@Param("soldierId")String soldierId, @Param("applyType")String applyType);

    @Crypt(encryptParamIndex = {0})
    SoldierApplyInfoDO getByIdCardNoOfType(@Param("idCardNo")String idCardNo, @Param("applyType")String applyType);

    SoldierApplyInfoDO getLastApplyOfSoldierId(@Param("soldierId")String soldierId, @Param("applyType")String applyType);

    Integer countQrSuccessByAreaAndType(@Param("areaLike")String areaLike, @Param("applyType")String applyType);

    Integer countQrSuccessByAreaAndTime(@Param("adminAreaCode")String adminAreaCode, @Param("beginDate")Date beginDate, @Param("endDate")Date endDate);


    List<SoldierApplyInfoDO> getByHoldMobile(String mobile);

    List<SoldierApplyInfoDO> getByMobile(String mobile);
}
